package com.qi.common;

import lombok.Getter;

@Getter
public enum Status {

    SUCCESS(0, "操作成功"),
    ERROR(-1, "操作失败"),
    AUTHENTICATION_ERROR(-2, "未认证，无法访问系统资源"),
    AUTHENTICATION_EXPIRED(-3, "用户认证过期，请重新登录"),
    PERMISSION_MISMATCHED(-4, "您无权访问该功能")

    ;
    private int code;
    private String msg;

    Status(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Status{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
